3.29 \(\int \frac{2+x}{(2+4 x-3 x^2) (1+3 x+2 x^2)^{3/2}} \, dx\)

Optimal. Leaf size=174 \[ \frac{2 (22 x+21)}{5 \sqrt{2 x^2+3 x+1}}-\frac{1}{10} \sqrt{\frac{3}{5} \left (2065+653 \sqrt{10}\right )} \tanh ^{-1}\left (\frac{\left (17-4 \sqrt{10}\right ) x+3 \left (4-\sqrt{10}\right )}{2 \sqrt{55-17 \sqrt{10}} \sqrt{2 x^2+3 x+1}}\right )+\frac{1}{10} \sqrt{\frac{3}{5} \left (2065-653 \sqrt{10}\right )} \tanh ^{-1}\left (\frac{\left (17+4 \sqrt{10}\right ) x+3 \left (4+\sqrt{10}\right )}{2 \sqrt{55+17 \sqrt{10}} \sqrt{2 x^2+3 x+1}}\right ) \]

[Out]

(2*(21 + 22*x))/(5*Sqrt[1 + 3*x + 2*x^2]) - (Sqrt[(3*(2065 + 653*Sqrt[10]))/5]*ArcTanh[(3*(4 - Sqrt[10]) + (17
 - 4*Sqrt[10])*x)/(2*Sqrt[55 - 17*Sqrt[10]]*Sqrt[1 + 3*x + 2*x^2])])/10 + (Sqrt[(3*(2065 - 653*Sqrt[10]))/5]*A
rcTanh[(3*(4 + Sqrt[10]) + (17 + 4*Sqrt[10])*x)/(2*Sqrt[55 + 17*Sqrt[10]]*Sqrt[1 + 3*x + 2*x^2])])/10

________________________________________________________________________________________

Rubi [A]  time = 0.254702, antiderivative size = 174, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133, Rules used = {1016, 1032, 724, 206} \[ \frac{2 (22 x+21)}{5 \sqrt{2 x^2+3 x+1}}-\frac{1}{10} \sqrt{\frac{3}{5} \left (2065+653 \sqrt{10}\right )} \tanh ^{-1}\left (\frac{\left (17-4 \sqrt{10}\right ) x+3 \left (4-\sqrt{10}\right )}{2 \sqrt{55-17 \sqrt{10}} \sqrt{2 x^2+3 x+1}}\right )+\frac{1}{10} \sqrt{\frac{3}{5} \left (2065-653 \sqrt{10}\right )} \tanh ^{-1}\left (\frac{\left (17+4 \sqrt{10}\right ) x+3 \left (4+\sqrt{10}\right )}{2 \sqrt{55+17 \sqrt{10}} \sqrt{2 x^2+3 x+1}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[(2 + x)/((2 + 4*x - 3*x^2)*(1 + 3*x + 2*x^2)^(3/2)),x]

[Out]

(2*(21 + 22*x))/(5*Sqrt[1 + 3*x + 2*x^2]) - (Sqrt[(3*(2065 + 653*Sqrt[10]))/5]*ArcTanh[(3*(4 - Sqrt[10]) + (17
 - 4*Sqrt[10])*x)/(2*Sqrt[55 - 17*Sqrt[10]]*Sqrt[1 + 3*x + 2*x^2])])/10 + (Sqrt[(3*(2065 - 653*Sqrt[10]))/5]*A
rcTanh[(3*(4 + Sqrt[10]) + (17 + 4*Sqrt[10])*x)/(2*Sqrt[55 + 17*Sqrt[10]]*Sqrt[1 + 3*x + 2*x^2])])/10

Rule 1016

Int[((g_.) + (h_.)*(x_))*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_)*((d_) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_), x_Sy
mbol] :> Simp[((a + b*x + c*x^2)^(p + 1)*(d + e*x + f*x^2)^(q + 1)*(g*c*(2*a*c*e - b*(c*d + a*f)) + (g*b - a*h
)*(2*c^2*d + b^2*f - c*(b*e + 2*a*f)) + c*(g*(2*c^2*d + b^2*f - c*(b*e + 2*a*f)) - h*(b*c*d - 2*a*c*e + a*b*f)
)*x))/((b^2 - 4*a*c)*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(p + 1)), x] + Dist[1/((b^2 - 4*a*c)*((c*d - a*
f)^2 - (b*d - a*e)*(c*e - b*f))*(p + 1)), Int[(a + b*x + c*x^2)^(p + 1)*(d + e*x + f*x^2)^q*Simp[(b*h - 2*g*c)
*((c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f))*(p + 1) + (b^2*(g*f) - b*(h*c*d + g*c*e + a*h*f) + 2*(g*c*(c*d - a*
f) - a*(-(h*c*e))))*(a*f*(p + 1) - c*d*(p + 2)) - e*((g*c)*(2*a*c*e - b*(c*d + a*f)) + (g*b - a*h)*(2*c^2*d +
b^2*f - c*(b*e + 2*a*f)))*(p + q + 2) - (2*f*((g*c)*(2*a*c*e - b*(c*d + a*f)) + (g*b - a*h)*(2*c^2*d + b^2*f -
 c*(b*e + 2*a*f)))*(p + q + 2) - (b^2*g*f - b*(h*c*d + g*c*e + a*h*f) + 2*(g*c*(c*d - a*f) - a*(-(h*c*e))))*(b
*f*(p + 1) - c*e*(2*p + q + 4)))*x - c*f*(b^2*(g*f) - b*(h*c*d + g*c*e + a*h*f) + 2*(g*c*(c*d - a*f) + a*h*c*e
))*(2*p + 2*q + 5)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, h, q}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2
- 4*d*f, 0] && LtQ[p, -1] && NeQ[(c*d - a*f)^2 - (b*d - a*e)*(c*e - b*f), 0] &&  !( !IntegerQ[p] && ILtQ[q, -1
])

Rule 1032

Int[((g_.) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbo
l] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[(2*c*g - h*(b - q))/q, Int[1/((b - q + 2*c*x)*Sqrt[d + e*x + f*x^2])
, x], x] - Dist[(2*c*g - h*(b + q))/q, Int[1/((b + q + 2*c*x)*Sqrt[d + e*x + f*x^2]), x], x]] /; FreeQ[{a, b,
c, d, e, f, g, h}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && PosQ[b^2 - 4*a*c]

Rule 724

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{2+x}{\left (2+4 x-3 x^2\right ) \left (1+3 x+2 x^2\right )^{3/2}} \, dx &=\frac{2 (21+22 x)}{5 \sqrt{1+3 x+2 x^2}}-\frac{2}{15} \int \frac{-72+\frac{81 x}{2}}{\left (2+4 x-3 x^2\right ) \sqrt{1+3 x+2 x^2}} \, dx\\ &=\frac{2 (21+22 x)}{5 \sqrt{1+3 x+2 x^2}}-\frac{1}{5} \left (9 \left (3-\sqrt{10}\right )\right ) \int \frac{1}{\left (4+2 \sqrt{10}-6 x\right ) \sqrt{1+3 x+2 x^2}} \, dx-\frac{1}{5} \left (9 \left (3+\sqrt{10}\right )\right ) \int \frac{1}{\left (4-2 \sqrt{10}-6 x\right ) \sqrt{1+3 x+2 x^2}} \, dx\\ &=\frac{2 (21+22 x)}{5 \sqrt{1+3 x+2 x^2}}+\frac{1}{5} \left (18 \left (3-\sqrt{10}\right )\right ) \operatorname{Subst}\left (\int \frac{1}{144+72 \left (4+2 \sqrt{10}\right )+8 \left (4+2 \sqrt{10}\right )^2-x^2} \, dx,x,\frac{-12-3 \left (4+2 \sqrt{10}\right )-\left (18+4 \left (4+2 \sqrt{10}\right )\right ) x}{\sqrt{1+3 x+2 x^2}}\right )+\frac{1}{5} \left (18 \left (3+\sqrt{10}\right )\right ) \operatorname{Subst}\left (\int \frac{1}{144+72 \left (4-2 \sqrt{10}\right )+8 \left (4-2 \sqrt{10}\right )^2-x^2} \, dx,x,\frac{-12-3 \left (4-2 \sqrt{10}\right )-\left (18+4 \left (4-2 \sqrt{10}\right )\right ) x}{\sqrt{1+3 x+2 x^2}}\right )\\ &=\frac{2 (21+22 x)}{5 \sqrt{1+3 x+2 x^2}}-\frac{1}{10} \sqrt{\frac{3}{5} \left (2065+653 \sqrt{10}\right )} \tanh ^{-1}\left (\frac{3 \left (4-\sqrt{10}\right )+\left (17-4 \sqrt{10}\right ) x}{2 \sqrt{55-17 \sqrt{10}} \sqrt{1+3 x+2 x^2}}\right )+\frac{1}{10} \sqrt{\frac{3}{5} \left (2065-653 \sqrt{10}\right )} \tanh ^{-1}\left (\frac{3 \left (4+\sqrt{10}\right )+\left (17+4 \sqrt{10}\right ) x}{2 \sqrt{55+17 \sqrt{10}} \sqrt{1+3 x+2 x^2}}\right )\\ \end{align*}

Mathematica [A]  time = 0.575963, size = 172, normalized size = 0.99 \[ \frac{1}{50} \left (\frac{\sqrt{30975-9795 \sqrt{10}} \sqrt{2 x^2+3 x+1} \tanh ^{-1}\left (\frac{4 \sqrt{10} x+17 x+3 \sqrt{10}+12}{2 \sqrt{55+17 \sqrt{10}} \sqrt{2 x^2+3 x+1}}\right )+440 x+420}{\sqrt{2 x^2+3 x+1}}-\sqrt{30975+9795 \sqrt{10}} \tanh ^{-1}\left (\frac{-4 \sqrt{10} x+17 x-3 \sqrt{10}+12}{2 \sqrt{55-17 \sqrt{10}} \sqrt{2 x^2+3 x+1}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(2 + x)/((2 + 4*x - 3*x^2)*(1 + 3*x + 2*x^2)^(3/2)),x]

[Out]

(-(Sqrt[30975 + 9795*Sqrt[10]]*ArcTanh[(12 - 3*Sqrt[10] + 17*x - 4*Sqrt[10]*x)/(2*Sqrt[55 - 17*Sqrt[10]]*Sqrt[
1 + 3*x + 2*x^2])]) + (420 + 440*x + Sqrt[30975 - 9795*Sqrt[10]]*Sqrt[1 + 3*x + 2*x^2]*ArcTanh[(12 + 3*Sqrt[10
] + 17*x + 4*Sqrt[10]*x)/(2*Sqrt[55 + 17*Sqrt[10]]*Sqrt[1 + 3*x + 2*x^2])])/Sqrt[1 + 3*x + 2*x^2])/50

________________________________________________________________________________________

Maple [B]  time = 0.11, size = 466, normalized size = 2.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2+x)/(-3*x^2+4*x+2)/(2*x^2+3*x+1)^(3/2),x)

[Out]

-1/20*(8+10^(1/2))*10^(1/2)*(1/3/(55/9+17/9*10^(1/2))/(2*(x-2/3-1/3*10^(1/2))^2+(17/3+4/3*10^(1/2))*(x-2/3-1/3
*10^(1/2))+55/9+17/9*10^(1/2))^(1/2)-1/3*(17/3+4/3*10^(1/2))/(55/9+17/9*10^(1/2))*(4*x+3)/(440/9+136/9*10^(1/2
)-(17/3+4/3*10^(1/2))^2)/(2*(x-2/3-1/3*10^(1/2))^2+(17/3+4/3*10^(1/2))*(x-2/3-1/3*10^(1/2))+55/9+17/9*10^(1/2)
)^(1/2)-1/(55/9+17/9*10^(1/2))/(55+17*10^(1/2))^(1/2)*arctanh(9/2*(110/9+34/9*10^(1/2)+(17/3+4/3*10^(1/2))*(x-
2/3-1/3*10^(1/2)))/(55+17*10^(1/2))^(1/2)/(18*(x-2/3-1/3*10^(1/2))^2+9*(17/3+4/3*10^(1/2))*(x-2/3-1/3*10^(1/2)
)+55+17*10^(1/2))^(1/2)))-1/20*(-8+10^(1/2))*10^(1/2)*(1/3/(55/9-17/9*10^(1/2))/(2*(x-2/3+1/3*10^(1/2))^2+(17/
3-4/3*10^(1/2))*(x-2/3+1/3*10^(1/2))+55/9-17/9*10^(1/2))^(1/2)-1/3*(17/3-4/3*10^(1/2))/(55/9-17/9*10^(1/2))*(4
*x+3)/(440/9-136/9*10^(1/2)-(17/3-4/3*10^(1/2))^2)/(2*(x-2/3+1/3*10^(1/2))^2+(17/3-4/3*10^(1/2))*(x-2/3+1/3*10
^(1/2))+55/9-17/9*10^(1/2))^(1/2)-1/(55/9-17/9*10^(1/2))/(55-17*10^(1/2))^(1/2)*arctanh(9/2*(110/9-34/9*10^(1/
2)+(17/3-4/3*10^(1/2))*(x-2/3+1/3*10^(1/2)))/(55-17*10^(1/2))^(1/2)/(18*(x-2/3+1/3*10^(1/2))^2+9*(17/3-4/3*10^
(1/2))*(x-2/3+1/3*10^(1/2))+55-17*10^(1/2))^(1/2)))

________________________________________________________________________________________

Maxima [B]  time = 1.56529, size = 902, normalized size = 5.18 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)/(-3*x^2+4*x+2)/(2*x^2+3*x+1)^(3/2),x, algorithm="maxima")

[Out]

-1/60*sqrt(10)*(588*sqrt(10)*x/(17*sqrt(10)*sqrt(2*x^2 + 3*x + 1) + 55*sqrt(2*x^2 + 3*x + 1)) - 588*sqrt(10)*x
/(17*sqrt(10)*sqrt(2*x^2 + 3*x + 1) - 55*sqrt(2*x^2 + 3*x + 1)) + 2112*x/(17*sqrt(10)*sqrt(2*x^2 + 3*x + 1) +
55*sqrt(2*x^2 + 3*x + 1)) + 2112*x/(17*sqrt(10)*sqrt(2*x^2 + 3*x + 1) - 55*sqrt(2*x^2 + 3*x + 1)) - 27*sqrt(10
)*log(2/9*sqrt(10) + 2/3*sqrt(2*x^2 + 3*x + 1)*sqrt(17*sqrt(10) + 55)/abs(6*x - 2*sqrt(10) - 4) + 34/9*sqrt(10
)/abs(6*x - 2*sqrt(10) - 4) + 110/9/abs(6*x - 2*sqrt(10) - 4) + 17/18)/(17*sqrt(10) + 55)^(3/2) - sqrt(10)*log
(-2/9*sqrt(10) + 2*sqrt(2*x^2 + 3*x + 1)*sqrt(-17/9*sqrt(10) + 55/9)/abs(6*x + 2*sqrt(10) - 4) - 34/9*sqrt(10)
/abs(6*x + 2*sqrt(10) - 4) + 110/9/abs(6*x + 2*sqrt(10) - 4) + 17/18)/(-17/9*sqrt(10) + 55/9)^(3/2) + 450*sqrt
(10)/(17*sqrt(10)*sqrt(2*x^2 + 3*x + 1) + 55*sqrt(2*x^2 + 3*x + 1)) - 450*sqrt(10)/(17*sqrt(10)*sqrt(2*x^2 + 3
*x + 1) - 55*sqrt(2*x^2 + 3*x + 1)) - 216*log(2/9*sqrt(10) + 2/3*sqrt(2*x^2 + 3*x + 1)*sqrt(17*sqrt(10) + 55)/
abs(6*x - 2*sqrt(10) - 4) + 34/9*sqrt(10)/abs(6*x - 2*sqrt(10) - 4) + 110/9/abs(6*x - 2*sqrt(10) - 4) + 17/18)
/(17*sqrt(10) + 55)^(3/2) + 8*log(-2/9*sqrt(10) + 2*sqrt(2*x^2 + 3*x + 1)*sqrt(-17/9*sqrt(10) + 55/9)/abs(6*x
+ 2*sqrt(10) - 4) - 34/9*sqrt(10)/abs(6*x + 2*sqrt(10) - 4) + 110/9/abs(6*x + 2*sqrt(10) - 4) + 17/18)/(-17/9*
sqrt(10) + 55/9)^(3/2) + 1656/(17*sqrt(10)*sqrt(2*x^2 + 3*x + 1) + 55*sqrt(2*x^2 + 3*x + 1)) + 1656/(17*sqrt(1
0)*sqrt(2*x^2 + 3*x + 1) - 55*sqrt(2*x^2 + 3*x + 1)))

________________________________________________________________________________________

Fricas [B]  time = 1.477, size = 1131, normalized size = 6.5 \begin{align*} \frac{\sqrt{5}{\left (2 \, x^{2} + 3 \, x + 1\right )} \sqrt{1959 \, \sqrt{10} + 6195} \log \left (-\frac{45 \, \sqrt{10} x +{\left (41 \, \sqrt{10} \sqrt{5} x - 130 \, \sqrt{5} x\right )} \sqrt{1959 \, \sqrt{10} + 6195} + 90 \, x - 90 \, \sqrt{2 \, x^{2} + 3 \, x + 1} + 90}{x}\right ) - \sqrt{5}{\left (2 \, x^{2} + 3 \, x + 1\right )} \sqrt{1959 \, \sqrt{10} + 6195} \log \left (-\frac{45 \, \sqrt{10} x -{\left (41 \, \sqrt{10} \sqrt{5} x - 130 \, \sqrt{5} x\right )} \sqrt{1959 \, \sqrt{10} + 6195} + 90 \, x - 90 \, \sqrt{2 \, x^{2} + 3 \, x + 1} + 90}{x}\right ) + \sqrt{5}{\left (2 \, x^{2} + 3 \, x + 1\right )} \sqrt{-1959 \, \sqrt{10} + 6195} \log \left (\frac{45 \, \sqrt{10} x +{\left (41 \, \sqrt{10} \sqrt{5} x + 130 \, \sqrt{5} x\right )} \sqrt{-1959 \, \sqrt{10} + 6195} - 90 \, x + 90 \, \sqrt{2 \, x^{2} + 3 \, x + 1} - 90}{x}\right ) - \sqrt{5}{\left (2 \, x^{2} + 3 \, x + 1\right )} \sqrt{-1959 \, \sqrt{10} + 6195} \log \left (\frac{45 \, \sqrt{10} x -{\left (41 \, \sqrt{10} \sqrt{5} x + 130 \, \sqrt{5} x\right )} \sqrt{-1959 \, \sqrt{10} + 6195} - 90 \, x + 90 \, \sqrt{2 \, x^{2} + 3 \, x + 1} - 90}{x}\right ) + 840 \, x^{2} + 20 \, \sqrt{2 \, x^{2} + 3 \, x + 1}{\left (22 \, x + 21\right )} + 1260 \, x + 420}{50 \,{\left (2 \, x^{2} + 3 \, x + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)/(-3*x^2+4*x+2)/(2*x^2+3*x+1)^(3/2),x, algorithm="fricas")

[Out]

1/50*(sqrt(5)*(2*x^2 + 3*x + 1)*sqrt(1959*sqrt(10) + 6195)*log(-(45*sqrt(10)*x + (41*sqrt(10)*sqrt(5)*x - 130*
sqrt(5)*x)*sqrt(1959*sqrt(10) + 6195) + 90*x - 90*sqrt(2*x^2 + 3*x + 1) + 90)/x) - sqrt(5)*(2*x^2 + 3*x + 1)*s
qrt(1959*sqrt(10) + 6195)*log(-(45*sqrt(10)*x - (41*sqrt(10)*sqrt(5)*x - 130*sqrt(5)*x)*sqrt(1959*sqrt(10) + 6
195) + 90*x - 90*sqrt(2*x^2 + 3*x + 1) + 90)/x) + sqrt(5)*(2*x^2 + 3*x + 1)*sqrt(-1959*sqrt(10) + 6195)*log((4
5*sqrt(10)*x + (41*sqrt(10)*sqrt(5)*x + 130*sqrt(5)*x)*sqrt(-1959*sqrt(10) + 6195) - 90*x + 90*sqrt(2*x^2 + 3*
x + 1) - 90)/x) - sqrt(5)*(2*x^2 + 3*x + 1)*sqrt(-1959*sqrt(10) + 6195)*log((45*sqrt(10)*x - (41*sqrt(10)*sqrt
(5)*x + 130*sqrt(5)*x)*sqrt(-1959*sqrt(10) + 6195) - 90*x + 90*sqrt(2*x^2 + 3*x + 1) - 90)/x) + 840*x^2 + 20*s
qrt(2*x^2 + 3*x + 1)*(22*x + 21) + 1260*x + 420)/(2*x^2 + 3*x + 1)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)/(-3*x**2+4*x+2)/(2*x**2+3*x+1)**(3/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2+x)/(-3*x^2+4*x+2)/(2*x^2+3*x+1)^(3/2),x, algorithm="giac")

[Out]

Exception raised: TypeError